package com.lagou.framework.interceptor;

import com.lagou.framework.mvc.MethodHandler;

import javax.servlet.http.HttpServletRequest;

/**
 * @author srh
 * @date 2020/03/19
 **/
@FunctionalInterface
public interface HandlerInterceptor {

    /**
     * 对handler进行权限拦截
     *
     * @param request handler 参数中对request
     * @param handler handler
     * @return true 放行、false 拦截
     */
    boolean preHandler(HttpServletRequest request, MethodHandler handler);

}
